#include <iostream>
#include <numeric>
#include <ranges>
#include <algorithm>
using namespace std;

template<class T>
T Add(const initializer_list<T>& nums) {
    cout << "there will accumulate " << *nums.begin() << " to " << *(nums.end() - 1) << endl;
    return std::reduce(begin(nums), end(nums), 0);
}

int main() {
    int sum = Add({1,2,3,4,5});
    cout << "sum: " << sum << endl;
    return 0;
}